package com.caijg.controller.user;


import com.caijg.model.vo.resp.Result;
import com.caijg.service.IQuestionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 问题表--用于体质评估 前端控制器
 * </p>
 *
 * @author caijg
 * @since 2025-05-07
 */
@RestController
@RequestMapping("/user/questions")
@RequiredArgsConstructor
@Slf4j
@Tag(name = "问卷问题模块")
public class QuestionController {

    @Autowired
    private final IQuestionService questionService;

    @Operation(summary = "获取问题列表")
    @GetMapping
    public Result getQuestions() {
        log.info("用户请求获取问题列表");
        return Result.success(questionService.list());
    }

}
